from django.shortcuts import render

from rest_framework import viewsets
from .models import Student,Grade,Course,Teacher
from students.serializers import CourseSerializer, GradeSerializer, StudentSerializer,TeacherSerializer
class StudentView(viewsets.ModelViewSet):
    queryset = Student.objects.all()
    serializer_class = StudentSerializer
    
    
class GradeView(viewsets.ModelViewSet):
    queryset = Grade.objects.all()
    serializer_class = GradeSerializer
    
    
class CourseView(viewsets.ModelViewSet):
    queryset = Course.objects.all()
    serializer_class=CourseSerializer
    
class TeacherView(viewsets.ModelViewSet):
    queryset = Teacher.objects.all()
    serializer_class = TeacherSerializer
    
